/**
*  fn_airStrike
*
*  Calls CAS jet to attack passed location
*
*  Domain: Server
**/
params ["_player", "_targetPos"];

//"Fire" remoteExec ["playMusic", east];


[ [format ["导弹支援: 正在路上！预计20S后到达坐标点%1。", mapGridPosition _targetPos], "PLAIN"] ] remoteExec ["TitleText", east];//
private _make_name = format ["CAS_%1", time/60];
_make = createMarker [_make_name, _targetPos];
_make setMarkerType "hd_objective";
_make setMarkerSize [.8,.8];
_make setMarkerText format ["CAS (%1)", name _player];
_make setMarkerColor "ColorRed";

//绿军隐藏标记
[_make, 0] remoteExec ['setMarkerAlphaLocal', resistance];

sleep 20;
deleteMarker _make;


private _scriptedCharge = "Bo_GBU12_LGB" createVehicle (_targetPos getPos[random 10, random 360]);
_scriptedCharge setDamage 1;

sleep 1;
_scriptedCharge = "Bo_GBU12_LGB_MI10" createVehicle (_targetPos getPos[random 10, random 360]);
_scriptedCharge setDamage 1;

for ("_i") from 1 to 12 do {
sleep 0.2;
_scriptedCharge = "Bo_GBU12_LGB" createVehicle (_targetPos getPos[random 30, random 360]);
_scriptedCharge setDamage 1;
};

sleep 0.3;
_scriptedCharge = "Bo_GBU12_LGB_MI10" createVehicle (_targetPos getPos[random 20, random 360]);
_scriptedCharge setDamage 1;

